<template>
	<view>
		<video :src="src" controls show-fullscreen-btn class="vi"></video>
		<view class="definition">
			<text v-bind:class="[definition === '0' ? active : '']">标清</text>
			<text v-bind:class="[definition === '1' ? active : '']">高清</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				mvinfo:null,
				src:'',
				definition: 1
			}
		},
		methods: {
			getsrc(id){
				uni.request({
					url:`http://134.175.83.178:3000/mv/detail?mvid=${id}`,
					method:"GET",
					success: (res) => {
						const { data } = res
						// console.log(data)
						this.mvinfo = data.data
						// this.src = data.data.url
					}
					
				})
			}
		},
		onLoad(query) {
			let id = query.id || 10914318
			// console.log(id)
			this.getsrc(id)
		}
	}
</script>

<style>
.vi{
	width: 100%;
}
.active{
	background: #4CD964;
}
</style>
